<template>
    
    <div class="product-container">
        <h3>标题：{{ title }}</h3>
        <p>价格：{{ price }}</p>
        <p>优惠期：{{ intro }}</p>
        <button @click="sunfn">砍价</button>
    </div>

</template>
<script>
export default {
     props: ['index','title', 'price', 'intro'],
    // props: ["obj"],
    data() {
        return {
            
        }
    },
    methods: {
        sunfn() {
             console.log("ok="+this.index);
            this.$emit("subprice", this.index, 1)
           
        }
    }
}

</script>
<style scoped>
.product-container{
    width: 100%;
    border: 2px solid #ccc;
    padding:20px;
    margin-bottom:10px;


}


</style>